home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcr / pcr4_4.lha / DIST / debugnub / INCLUDE / xr / CirioNubProtocol.h < prev    next >
C/C++ Source or Header  |  1989-11-02  |  2KB  |  98 lines

  1. /* begincopyright
  2.   Copyright (c) 1988 Xerox Corporation. All rights reserved.
  3.   Use and copying of this software and preparation of derivative works based
  4.   upon this software are permitted. Any distribution of this software or
  5.   derivative works must comply with all applicable United States export
  6.   control laws. This software is made available AS IS, and Xerox Corporation
  7.   makes no warranty about the software, its performance or its conformity to
  8.   any specification. Any person obtaining a copy of this software is requested
  9.   to send their name and post office or electronic mail address to:
  10.     PCR Coordinator
  11.     Xerox PARC
  12.     3333 Coyote Hill Rd.
  13.     Palo Alto, CA 94304
  14.   endcopyright */
  15.  
  16. /*
  17.  * CirioNubProtocol.h
  18.  *
  19.  * Demers, November 2, 1989 10:12:55 am PST
  20.  *
  21.  * CirioNub protocol.
  22.  *
  23.  * Bad design: CirioNubRetCode is known to all clients,
  24.  *   so this file gets included everywhere.
  25.  */
  26.  
  27. #ifndef _CIRIO_NUB_PROTOCOL_
  28. #define _CIRIO_NUB_PROTOCOL_
  29.  
  30.  
  31. #include <sys/types.h>
  32.  
  33. /*
  34.  * well known port
  35.  */
  36.  
  37. #define CIRIO_NUB_LISTENER_PORT        4815
  38.  
  39. #define CIRIO_NUB_PROTOCOL_VERSION    0
  40.  
  41. #define CIRIO_NUB_VERSION(proto,procs) ( ((proto)<<16) | (procs) )
  42.  
  43. /*
  44.  * return codes
  45.  */
  46.  
  47. typedef enum CirioNubRetCode {
  48.     cnrc_ok = 0,
  49.     cnrc_noProc = 1,
  50.     cnrc_badArgs = 2,
  51.  
  52.     /* the remaining return codes require destroying the stream */
  53.  
  54.     cnrc_MUST_CLOSE_CONNECTION = 128,
  55.     cnrc_failure = 128,
  56.     cnrc_comm = 129,
  57.     cnrc_protocol = 130,
  58.     cnrc_space = 131,
  59.     cnrc_last = 0x7fffffff
  60. } CirioNubRetCode;
  61.  
  62.  
  63. /*
  64.  * types (of tagged values passed over the wire)
  65.  */
  66.  
  67. typedef enum CirioNubTag {
  68.     cnt_null = 0,
  69.     cnt_procID = 1,
  70.     cnt_retCode = 2,
  71.     cnt_card32 = 3,
  72.     cnt_int32 = 4,
  73.     cnt_string = 5,
  74.     cnt_block8 = 6,
  75.     cnt_block16 = 7,
  76.     cnt_block32 = 8,
  77.     cnt_last = 0x7fff
  78. };
  79.  
  80.  
  81. /*
  82.  * representation on the wire
  83.  *
  84.  * call is args followed by procID
  85.  * reply is results followed by retCode
  86.  */
  87.  
  88. typedef short net_short;
  89. typedef long net_long;
  90.  
  91.  
  92. typedef struct CirioNubWrapper {
  93.     net_short cnw_tag;
  94.     net_short cnw_len;
  95. };
  96.  
  97. #endif /* _CIRIO_NUB_PROTOCOL_ */
  98.